<style>
    .rich-panel-body {
        font-size: 13px;
    }
    .rich-table-cell {
        border: 0px;
    }
</style>
<f:view>
    <h:form>
        <h:outputText value="Posting in #{sessionBean.ejbSession.currentSite.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.hous==null}"/>
        <h:outputText value="Posting in #{housBean.hous.site.site}"  style="font-size: 20px; font-weight: bold;"  rendered="#{sessionBean.ejbSession.hous!=null}"/>
        <h:outputText value=", #{housBean.area.area}"  style="font-size: 20px; font-weight: bold;" rendered="#{housBean.areaId>0}"/>
        <br/>
        <h:outputText value="#{housBean.hous.title}"  style="font-size: 18px; font-weight: bold;"/>
        <h:outputText value=", #{housBean.hous.amountType} #{housBean.hous.amountValue}$"  style="font-size: 18px; font-weight: bold;" rendered="#{housBean.hous.amountValue>0}" />
        <h:outputText value=" / #{housBean.hous.sizeValue}#{housBean.hous.sizeType}"  style="font-size: 18px; font-weight: bold;" rendered="#{housBean.hous.amountValue>0 && housBean.hous.sizeValue>0}" />
        <h:outputText value=", #{housBean.hous.sizeValue}#{housBean.hous.sizeType}"  style="font-size: 18px; font-weight: bold;" rendered="#{housBean.hous.amountValue==0 && housBean.hous.sizeValue>0}" />
        <h:outputText value=" - (#{housBean.hous.location})"  style="font-size: 18px; font-weight: bold;" rendered="#{housBean.hous.location!=null && housBean.hous.location!=''}" />
        <rich:separator height="1"/>
        <h:outputText value="Reply to: "/>
        <h:outputLink value="mailto:#{housBean.hous.email}" rendered="#{housBean.hous.typeReplyTo=='real email'}">
            <h:outputText value="#{housBean.hous.email}"></h:outputText>
        </h:outputLink>
        <h:outputText value="your anonymous eez2find address will appear here" style="font-style: italic;" rendered="#{sessionBean.ejbSession.hous==null && housBean.hous.typeReplyTo=='masked email'}" />
        <h:outputLink value="mailto:house-#{housBean.hous.code}@eez2find.com" rendered="#{sessionBean.ejbSession.hous!=null && housBean.hous.typeReplyTo=='masked email'}">
            <h:outputText value="house-#{housBean.hous.code}@eez2find.com"></h:outputText>
        </h:outputLink>
        <h:outputText value="see below" rendered="#{housBean.hous.typeReplyTo=='any email'}" />
        <br/>
        <h:outputText value="Date: #{housBean.toDay}"/>
        <rich:spacer height="20"/>
        <rich:panel style="width:700px; border-color:white;">
            ${housBean.description}
        </rich:panel>
        <rich:dataGrid columns="2" value="#{housBean.uploadItems}" rowKeyVar="row" >
            <a4j:mediaOutput element="img" mimeType="image/jpg" createContent="#{housBean.paintPreview}" value="#{row}" cacheable="false" />
        </rich:dataGrid>
        <ul>
            <c:if test="${housBean.hous.location!=null && housBean.hous.location!=''}"><li><h:outputText value="Location: #{housBean.hous.location}" /></li></c:if>
            <c:if test="${housBean.hous.address!=null && housBean.hous.address!=''}"><li><h:outputText value="Address: #{housBean.hous.address}" /></li></c:if>
            <c:if test="${housBean.hous.cats}"><li><h:outputText value="cats are OK." /></li></c:if>
            <c:if test="${housBean.hous.dogs}"><li><h:outputText value="dogs are OK." /></li></c:if>
            <c:if test="${housBean.hous.othersContact}"><li><h:outputText value="it's ok to contact this poster with services or other commercial interests." /></li></c:if>
            <c:if test="${!housBean.hous.othersContact}"><li><h:outputText value="it's NOT ok to contact this poster with services or other commercial interests." /></li></c:if>
        </ul>
        <rich:spacer height="10"/>
        <h:outputText value="House Code: #{housBean.hous.code}" rendered="#{sessionBean.ejbSession.hous!=null}" />
    </h:form>
    <h:form>
        <h:messages globalOnly="true" style="color: red" styleClass="errorMessage"/>
        <h:panelGrid columns="2">
            <h:outputLink value="/site/faces/housPosting/create.jsp" rendered="#{sessionBean.ejbSession.hous==null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:outputLink value="/site/faces/housPosting/edit.jsp" rendered="#{sessionBean.ejbSession.hous!=null}">
                <h:outputText value="Back to Edit"></h:outputText>
            </h:outputLink>
            <h:commandButton id="submitCreate" type="submit" value="Create" action="#{housBean.create}" rendered="#{sessionBean.ejbSession.hous==null && housBean.housPrice==0}"/>
            <h:commandButton id="submitContinue" type="submit" value="Continue" action="#{housBean.pay}" rendered="#{sessionBean.ejbSession.hous==null && housBean.housPrice>0}"/>
            <h:commandButton id="submitUpdate" type="submit" value="Update" action="#{housBean.update}" onclick="if(!confirm('Your Post has been edited. Are you sure?'))return false" rendered="#{sessionBean.ejbSession.hous!=null}" />
        </h:panelGrid>
    </h:form>
    <rich:separator height="1" />
</f:view>